<template>
  <view class="my-orders-index-containter">
    <view class="my-orders-top-bar-containter">
      <block v-for="(item, index) in arrTabIndex" :key="index">
        <!--bindtap不能给响应事件传递参数，改用data-index 在响应函数里采用event.currentTarget.dataset.index取数据-->
        <view :class="[
        'my-orders-top-bar-title',
        { selected: curTabIndex == index },
      ]" @tap="onChange(index)">
          {{ arrTabTxt[index] }}
        </view>
      </block>
    </view>
    <view v-if="showRecommend">
      <view class="my-orders-index-empty">暂无订单</view>
      <!-- #ifdef H5  -->
      <HotRecommend></HotRecommend>
      <!-- #endif -->
    </view>
    <view @click="fatherClick" v-if="arrShopItems.length !== 0">
      <view class="my-orders-index-shop-wrap">
        <block v-for="(item, i) in arrShopItems" :key="item.key">
          <!--我的订单-商家Item-->
          <view class="my-orders-shop-item-containter">
            <view class="my-orders-shop-item-top">
              <view class="my-orders-shop-item-top-left">
                <image class="my-orders-shop-item-top-left-shop" src="../../static/img/shoppingCart/icon_shop.png" />
                <view class="my-orders-shop-item-top-left-shop-name">{{
        mallConfig.storeName
      }}</view>
                <view class="my-orders-shop-item-top-left-arrow"> > </view>
              </view>
              <view class="my-orders-shop-item-top-tips">
                <block v-if="item.orderStatus == 1">
                  <span class="wait-pay-tips">等待买家付款</span>
                </block>
                <block v-if="item.orderStatus == 2">
                  <span class="wait-pay-tips">超时未支付</span>
                </block>
                <block v-if="item.orderStatus == 3">
                  <span class="wait-pay-tips">待发货</span>
                </block>
                <block v-if="item.orderStatus == 4">
                  <span class="wait-pay-tips">卖家已发货</span>
                </block>
                <block v-if="item.orderStatus == 5">
                  <span class="wait-pay-tips">已签收</span>
                </block>
                <block v-if="item.orderStatus == 6">
                  <span class="wait-pay-tips">已评价</span>
                </block>
                <block v-if="item.orderStatus == 9">
                  <span class="wait-pay-tips">订单取消</span>
                </block>
                <block v-if="item.orderStatus == 10">
                  <span class="wait-pay-tips">已退款</span>
                </block>
                <block v-if="item.orderStatus == 11">
                  <span class="wait-pay-tips">退款中</span>
                </block>
                <block v-if="item.orderStatus == 12">
                  <span class="wait-pay-tips">退款失败</span>
                </block>
                <block v-if="curTabIndex == 5">
                  <span class="wait-pay-tips">{{ item.afterSaleStatusName }}</span>
                </block>
              </view>
            </view>
            <view class="my-orders-shop-item-detail">
              <block v-for="(product, index) in item.products" :key="product.productId">
                <view class="my-orders-shop-item-detail-item" @tap="toDetail(item)" :key="index">
                  <view class="my-orders-shop-item-detail-item-left">
                    <image mode="widthFix" class="my-orders-shop-item-detail-item-left-img"
                      :src="product.productSquareUrl" />
                    <view class="my-orders-shop-item-detail-item-left-txt">
                      <view class="my-orders-shop-item-detail-item-left-title">{{ product.productName }}
                      </view>
                      <!-- <view class="my-orders-shop-item-detail-item-left-desc">{{
												product.productDesc
											}}
											</view> -->
                    </view>
                  </view>
                  <view v-if="curTabIndex !== 5" class="my-orders-shop-item-detail-item-right">
                    <view class="my-orders-shop-item-detail-item-right-money">￥{{ product.price }}
                    </view>
                    <view class="my-orders-shop-item-detail-item-right-cnt">x{{ product.count }}
                    </view>
                  </view>
                </view>
              </block>
            </view>
            <view class="my-orders-shop-item-total" v-if="item.couponConfig !== null">
              商品优惠:
              <span style="color: rgba(242, 85, 0, 1); margin-left: 5rpx" class="my-orders-shop-item-total-money">-￥{{
        item.couponAmount || 0 }}</span>
            </view>
            <view v-if="curTabIndex !== 5" class="my-orders-shop-item-total">
              共{{ item.totalCount }}件商品
              <span class="express_price" v-if="item.expressAmount != 0">包含运费{{ item.expressAmount }}</span>
              合计:<span style="color: rgba(242, 85, 0, 1)" class="my-orders-shop-item-total-money">￥{{ item.totalAmount
                }}</span>
            </view>
            <view class="my-orders-shop-item-control">
              <!-- <view :id="'more' + i" @click="(e) => showMenu(e, i)" class="view_more">
                更多
                <view class="view_more_menu" v-show="showMenuIndex === i">
                  <view class="view_more_menu_item" @click="toInvoice(item)">申请开票</view>
                  <view class="view_more_menu_item" @click="toAfter(item)">申请售后</view>
                </view>
              </view> -->
              <view v-if="item.orderStatus === 1" class="my-orders-shop-item-control-btn gray"
                @tap="onCancelOrder(item, i)">
                取消</view>
              <view v-if="item.orderStatus === 1" class="my-orders-shop-item-control-btn red" @tap="onPay(item)">付款
              </view>
              <view v-if="item.orderStatus === 3" class="my-orders-shop-item-control-btn gray" @tap="refundOrder(item)">
                退款
              </view>
              <view v-if="item.orderStatus === 3" class="my-orders-shop-item-control-btn gray"
                @tap="onNoticeSend(item)">
                提醒发货
              </view>
              <view v-if="item.orderStatus === 4" class="my-orders-shop-item-control-btn gray"
                @tap="onLookLogistics(item)">查看物流
              </view>
              <view v-if="item.orderStatus === 4" class="my-orders-shop-item-control-btn red"
                @tap="onUpdateOrder(item, i)">确认收货
              </view>
              <view v-if="item.orderStatus == 5" class="my-orders-shop-item-control-btn gray" @tap="toEva(item, i)">去评价
              </view>
              <view v-if="item.orderStatus == 5 ||
        item.orderStatus == 2 ||
        item.orderStatus == 9 ||
        item.orderStatus == 6
        " class="my-orders-shop-item-control-btn gray" @tap="onDeleteOrder(item, i)">删除订单
              </view>
              <view v-if="item.orderStatus === -1" class="my-orders-shop-item-control-btn gray"
                @tap="onCancelOrder(item, i)">取消订单
              </view>
              <view v-if="item.orderStatus === -1" class="my-orders-shop-item-control-btn red" bindtap="onPay">
                付款</view>
              <view v-if="curTabIndex === 5" class="my-orders-shop-item-control-btn red" @tap="toAfter(item)">
                详情</view>
            </view>
            <view v-if="i !== arrShopItems.length - 1" class="border_bottom_gray"></view>
          </view>
        </block>
      </view>
      <view class="no_more" v-if="curPageCnt > totalPage">- 没有更多了 -</view>
    </view>
  </view>
</template>

<script>
import { common, order } from "../../services/index.js";
import Goods from "../components/goods";
import Big from "big.js";
import qs from "qs";
import HotRecommend from "../components/hotRecommend/index.vue";
import { mapState } from "vuex";
// wait_pay: 1,//待支付,
// pay_fail: 2,//支付失败,
// wait_send: 3,//已支付(待发货),
// had_send: 4,//已发货(待签收),
// over: 5,//已签收,
// assess: 6,//已评价,
// del: 7,//已删除,
// unknown: 0,//不存在
// all: 8,//查询所有的订单
// show: -1//前端样式显示
export default {
  data() {
    return {
      arrModuleData: [],
      arrTabTxt: ["全部", "待付款", "待发货", "待收货", "待评价", "售后/退款"],
      arrTabIndex: [8, 1, 3, 4, 5, 20],
      arrShopItems: [], //当前标签下的商品列表
      curTabIndex: -1, //当前选中的标题模块
      totalPage: 2, //总页数
      curPageCnt: 1, //当前页码
      from: undefined,
      showRecommend: false,
      reOrder: false,
      totalCount: 0,
      showMenuIndex: "",
    };
  },
  components: {
    Goods,
    HotRecommend,
  },
  computed: {
    ...mapState(["mallConfig"]),
  },
  mounted() { },
  methods: {
    showMenu(e, index) {
      e.preventDefault();
      e.stopPropagation();
      this.showMenuIndex = index;
    },
    fatherClick(e) {
      if (e.target.id.indexOf('more') === -1) {
        this.showMenuIndex = '';
      }
    },
    toInvoice(item) {
      uni.navigateTo({
        url: "/pages/invoice/index?orderNo=" + item.orderNo,
      });
    },
    toAfter(item) {
      uni.navigateTo({
        url: "/pages/after/index?orderNo=" + item.orderNo + '&productId=' + item.productId,
      });
    },
    async getOrders(page, size) {
      uni.showLoading();
      let res = await common.getOrders(page, size);
      if (res.code === 200) {
        res.data.records.forEach((e) => {
          let totalPrice = new Big(0);
          let totalCount = 0;
          e.products.forEach((f) => {
            totalCount += f.count;
            f.price = new Big(f.price).div(100); //除100
            totalPrice = totalPrice.plus(f.price.times(f.count)); //数量*价格
          });
          e.expressAmount = new Big(e.expressAmount).div(100);
          e.totalAmount = new Big(e.totalAmount).div(100);
          e.totalCount = totalCount;
          if (e.couponConfig !== null) {
            e.couponAmount = totalPrice
              .minus(e.totalAmount)
              .minus(e.expressAmount);
          }
        });
        // key
        res.data.records.forEach((e) => {
          if (!e.id) {
            e.id = '';
          }
          e.key = String(e.orderNo) + e.id;
        })
        this.arrShopItems = res.data.records;
      } else {
        uni.showToast({
          icon: "none",
          title: res.msg,
          duration: 2000,
        });
      }
      uni.hideLoading();
    },
    async onPay(item) {
      if (this.reOrder) {
        return false;
      }
      this.reOrder = true;
      let that = this;
      // #ifdef MP-WEIXIN
      let res = await order.againOrder({ orderNo: item.orderNo });
      if (res.code === 200 && res.data !== null) {
        wx.requestPayment({
          timeStamp: res.data.timeStamp, //时间戳从1970年1月1日00:00:00至今的秒数,即当前的时间
          nonceStr: res.data.nonceStr, //随机字符串，长度为32个字符以下。
          package: res.data.packageDate, //统一下单接口返回的 prepay_id 参数值，提交格式如：prepay_id=*
          signType: res.data.signType, //签名类型，默认为MD5，支持HMAC-SHA256和MD5。注意此处需与统一下单的签名类型一致
          paySign: res.data.paySign, //密钥
          complete: (res) => {
            that.getOrders();
            // uni.navigateTo({
            // 	url: '/pages/myOrder/index?from=orderConfirm',
            // })
          },
        });
      } else {
        uni.showToast({
          icon: "none",
          title: res.msg,
        });
      }
      // #endif

      // #ifdef H5
      let ailRes = {};
      if (item.payWay === 2) {
        ailRes = await order.againOrderV2({ orderNo: item.orderNo });
      } else if (item.payWay === 1) {
        ailRes = await order.againOrderV2({ orderNo: item.orderNo });
      }
      if (ailRes.code === 200) {
        let payWay = 5;
        if (item.payWay === 1) {
          //服务器返回的item.payWay 和 APP不对应
          payWay = 3;
        }
        let payData = {
          payWay,
        };
        if (payWay === 5) {
          payData.orderInfo = encodeURIComponent(ailRes.data.param);
        } else if (payWay === 3) {
          payData.orderInfo = ailRes.data;
        }
        window.flutter_inappwebview
          .callHandler(
            "sxbookstore",
            "sxbookstore://book.rebook.com/function?cmd=pay&data=" +
            JSON.stringify(payData) +
            "&callbackId=1&cbDispatcher=loginCallBack"
          )
          .then(function (res) {
            res = JSON.parse(res);
            if (res.data.errCode === 0) {
              let payRes = JSON.parse(res.data.data);
              if (payRes.resultStatus === 9000) {
                that.getOrders();
              } else {
                uni.showToast({
                  title: "未支付成功",
                  icon: "none",
                });
              }
            }
          });
      } else {
        this.reOrder = false;
        uni.showToast({
          icon: "none",
          title: res.msg,
        });
      }
      // #endif
      //

      this.reOrder = false;
    },
    async onCancelOrder(item, index) {
      let that = this;
      uni.showModal({
        title: "是否确认取消该订单",
        confirmText: "确认",
        success: async function (res) {
          if (res.confirm) {
            uni.showLoading();
            let res = await order.closeOrder({ orderNo: item.orderNo });
            if (res.code === 200) {
              uni.showToast({
                icon: "none",
                title: "取消成功",
                complete: () => {
                  uni.hideLoading();
                },
              });
              that.arrShopItems[index].orderStatus = 9;
              //that.queryNextPageDetails();
            } else {
              uni.showToast({
                icon: "none",
                title: res.msg,
                complete: () => {
                  uni.hideLoading();
                },
              });
            }
          } else if (res.cancel) {
          }
        },
      });
    },
    async onDeleteOrder(item, index) {
      let that = this;
      uni.showModal({
        title: "是否确认删除该订单",
        confirmText: "删除",
        success: async function (res) {
          if (res.confirm) {
            uni.showLoading();
            let res = await order.orderStatusChange({
              orderNo: item.orderNo,
              orderStatus: 7,
            });
            if (res.code === 200) {
              uni.showToast({
                icon: "none",
                title: "删除成功",
                complete: () => {
                  uni.hideLoading();
                },
              });
              that.arrShopItems.splice(index, 1);
              //	that.queryNextPageDetails();
            } else {
              uni.showToast({
                icon: "none",
                title: res.msg,
                complete: () => {
                  uni.hideLoading();
                },
              });
            }
          } else if (res.cancel) {
          }
        },
      });
    },
    async refundOrder(item) {
      // payWay 1微信 2支付宝
      let that = this;
      uni.showModal({
        title: "是否确认退款",
        confirmText: "确认",
        success: async function (res) {
          if (res.confirm) {
            let res = {};
            uni.showLoading();
            if (item.payWay === 1) {
              res = await order.refundOrder({ orderNo: item.orderNo });
            } else {
              res = await order.refundOrder({ orderNo: item.orderNo });
            }
            if (res.code === 200) {
              uni.showToast({
                icon: "none",
                title: "已经申请退款",
                duration: 2000,
                complete: () => {
                  setTimeout(() => {
                    uni.hideLoading();
                    that.refreshPage();
                  }, 2000);
                },
              });
            } else {
              uni.showToast({
                icon: "none",
                title: res.msg,
                duration: 2000,
                complete: () => {
                  uni.hideLoading();
                },
              });
            }
          } else if (res.cancel) {
          }
        },
      });
    },
    async onNoticeSend(item) {
      uni.showLoading();
      let res = await order.orderRemind({
        orderNo: item.orderNo,
      });
      if (res.code === 200) {
        uni.showToast({
          icon: "none",
          title: "提醒发货成功",
          complete: () => {
            uni.hideLoading();
          },
        });
      } else {
        uni.showToast({
          icon: "none",
          title: res.msg,
          duration: 2000,
          complete: () => {
            uni.hideLoading();
          },
        });
      }
    },
    async onUpdateOrder(item, index) {
      let that = this;
      uni.showModal({
        title: "是否确认收货",
        confirmText: "确认",
        success: async function (res) {
          if (res.confirm) {
            uni.showLoading();
            let res = await order.orderStatusChange({
              orderNo: item.orderNo,
              orderStatus: 5,
            });
            if (res.code === 200) {
              that.arrShopItems[index].orderStatus = 5;
              uni.hideLoading();
            } else {
              uni.showToast({
                icon: "none",
                title: res.msg,
                complete: () => {
                  uni.hideLoading();
                },
              });
            }
          } else if (res.cancel) {
          }
        },
      });
    },
    toEva(item) {
      let data = {
        orderNo: item.orderNo,
      };
      let str = qs.stringify(data);
      uni.navigateTo({
        url: "/pages/evaluation/index?" + str,
      });
    },
    onLookLogistics(item) {
      let data = {
        deliveryId: item.lcId,
        lId: item.lid,
        orderNo: item.orderNo,
        type: 'order',
      };
      let str = qs.stringify(data);
      uni.navigateTo({
        url: "/pages/logisticsDetails/index?" + str,
      });
    },
    onLoad(params) {
      let index = this.arrTabIndex.indexOf(Number(params.orderType));
      this.curTabIndex = index;
      this.from = params.from;
      this.refreshPage();
      uni.removeStorage({
        key: 'selectInvoiceId'
      });
    },
    onShow() { },
    //收到事件-标题tab切换
    onChange(tabIndex) {
      uni.pageScrollTo({
        scrollTop: 0,
        duration: 200,
      });
      if (tabIndex === this.curTabIndex) return;
      this.curTabIndex = tabIndex;
      this.showMenuIndex = "";
      this.refreshPage();
    },
    /**
     * 查询订单详情
     */
    refreshPage() {
      this.curPageCnt = 1;
      this.arrShopItems = [];
      this.totalPage = 0;
      this.queryNextPageDetails(true);
    },
    //查询下一页的数据
    async queryNextPageDetails(init) {
      if (!init) {
        if (this.curPageCnt > this.totalPage) {
          return;
        }
      }
      uni.showLoading();
      //根据页面获取数据
      let status = this.arrTabIndex[this.curTabIndex];
      let res = {};
      let pageData = [];
      this.showMenuIndex = "";
      if (status === 20) {
        res = await order.aftersaleList({ current: this.curPageCnt, size: 10 });
      } else if (status === 8) {
        res = await common.getOrders(this.curPageCnt, 10);
      } else {
        res = await common.getOrders(this.curPageCnt, 10, status);
      }
      if (res.code === 200) {
        res.data.records.forEach((e) => {
          if (!e.id) {
            e.id = '';
          }
          e.key = String(e.orderNo) + e.id;
        })
        pageData = res.data.records;
        pageData.forEach((e) => {
          let totalPrice = new Big(0);
          let totalCount = 0;
          if (status === 20) {
            e.products = [e.product];
            e.couponConfig = null;
            let afterSaleStatusName = ['', '买家已经申请退款，等待卖家同意', '卖家已经同意退款，等待买家退货', '买家已经退货，等待卖家确认收货', '等待卖家退款', '退款中', '售后单已完成', '售后单关闭', '等待卖家发货', '卖家已经发货，等待买家确认收货'];
            e.afterSaleStatusName = afterSaleStatusName[e.afterSaleStatus];
          }
          if (status !== 20) {
            e.products.forEach((f) => {
              totalCount += f.count;
              f.price = new Big(f.price).div(100);
              totalPrice = totalPrice.plus(f.price.times(f.count)); //数量*价格
            });
            e.expressAmount = new Big(e.expressAmount).div(100);
            e.totalAmount = new Big(e.totalAmount).div(100);
            e.totalCount = totalCount;
            if (e.couponConfig !== null) {
              e.couponAmount = totalPrice
                .minus(e.totalAmount)
                .minus(e.expressAmount);
            }
          }
        });
        this.arrShopItems = this.arrShopItems.concat(pageData);
        this.curPageCnt += 1;
        this.showRecommend = (this.arrShopItems.length === 0);
        this.totalPage = res.data.pages;
        uni.hideLoading();
      } else {
        uni.showToast({
          icon: "none",
          title: res.msg,
          duration: 2000,
          complete: () => {
            uni.hideLoading();
          },
        });
      }
    },
    //上拉触底事件,加载下一页数据
    onReachBottom: function () {
      this.queryNextPageDetails();
    },
    toDetail(item) {
      console.log(item);
      uni.navigateTo({
        url: "/pages/orderDetail/index?showInvoice=0&orderNo=" + item.orderNo,
      });
    },
  },
};
</script>

<style scoped>
/*我的订单*/
page {
  background-color: #f6f6f6;
  width: 100%;
  height: 100%;
}

.my-orders-index-containter {
  position: relative;
  width: 100%;
  height: 100%;
}

.my-orders-index-empty {
  background: #fff;
  width: 100%;
  height: 600rpx;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.my-orders-index-shop-wrap {
  padding-top: 120rpx;
}

/*我的订单-标签栏*/
my-orders-top-bar {
  width: 100%;
}

.my-orders-top-bar-containter {
  position: fixed;
  z-index: 999;
  width: 100%;
  height: 96rpx;
  background: #fff;
  box-shadow: 0px 2px 6px 0px rgba(51, 51, 51, 0.1);
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
}

.my-orders-top-bar-title {
  font-size: 28rpx;
  text-align: center;
  line-height: 96rpx;
  width: 100%;
  color: #666;
}

.selected {
  color: #f25500;
  border-bottom: 4rpx solid #f00;
}

.home_popular {
  text-align: center;
  margin: 25rpx 0;
}

.home_popular_img {
  height: 80rpx;
  width: 315rpx;
}

.my-orders-shop-item-containter {
  position: relative;
  width: 100%;
  background: #fff;
  margin: 20rpx 0;
  display: inline-block;
}

.my-orders-shop-item-top {
  height: 70rpx;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25rpx;
}

.my-orders-shop-item-top-left {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
}

.my-orders-shop-item-top-left-shop {
  width: 38rpx;
  height: 32rpx;
  margin: 0 30rpx;
}

.my-orders-shop-item-top-left-shop-name {
  font-size: 28rpx;
  font-weight: bold;
  color: rgba(51, 51, 51, 1);
  margin-right: 15rpx;
}

.my-orders-shop-item-top-left-arrow {
  color: #999;
}

.my-orders-shop-item-top-tips {
  font-size: 28rpx;
  font-weight: bold;
  color: rgba(242, 85, 0, 1);
  line-height: 36rpx;
  margin-right: 30rpx;
}

.my-orders-shop-item-total {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  margin: 0 30rpx 20rpx 0;
  color: #666;
  font-size: 24rpx;
}

.my-orders-shop-item-total-money {
  font-weight: bold;
  font-size: 32rpx;
}

.my-orders-shop-item-control {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  border-top: 1rpx solid rgba(230, 230, 230, 1);
  padding: 30rpx 0;
}

.my-orders-shop-item-control-btn {
  width: 173rpx;
  height: 62rpx;
  border-radius: 31rpx;
  text-align: center;
  font-size: 28rpx;
  line-height: 62rpx;
  margin-right: 30rpx;
}

.view_more {
  color: #666;
  font-size: 28rpx;
  margin-right: 30rpx;
  position: relative;
}

.view_more_menu {
  position: absolute;
  bottom: 45rpx;
  right: 15rpx;
  background-color: #fff;
  border-radius: 10rpx;
  border: 1rpx solid #eee;
  padding: 10rpx;
  text-align: center;
  width: 130rpx;
}

.gray {
  border: 1rpx solid rgba(204, 204, 204, 1);
  color: #666;
}

.red {
  border: 1rpx solid rgba(242, 85, 0, 1);
  color: #f25500;
}

.my-orders-shop-item-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.my-orders-shop-item-detail-item {
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 20rpx;
  margin-right: 25rpx;
}

.my-orders-shop-item-detail-item-left {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: center;
}

.my-orders-shop-item-detail-item-left-img {
  width: 185rpx;
  margin-left: 30rpx;
  flex: 0 0 185rpx;
}

.my-orders-shop-item-detail-item-right {
  text-align: right;
  line-height: 50rpx;
  margin-right: 30rpx;
}

.my-orders-shop-item-detail-item-right-money {
  font-size: 28rpx;
  color: rgba(242, 85, 0, 1);
}

.my-orders-shop-item-detail-item-right-cnt {
  font-size: 24rpx;
  color: #999;
}

.my-orders-shop-item-detail-item-left-txt {
  margin-left: 10rpx;
}

.my-orders-shop-item-detail-item-left-title {
  width: 377rpx;
  color: #333;
  font-size: 24rpx;
  color: rgba(51, 51, 51, 1);
  line-height: 36rpx;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.my-orders-shop-item-detail-item-left-desc {
  color: #666;
  font-size: 24rpx;
  line-height: 36rpx;
  word-break: break-all;
}

.no_more {
  text-align: center;
  padding: 20rpx 0;
}

.express_price {
  margin: 0 10rpx;
}

.border_bottom_gray {
  height: 30rpx;
  background-color: #eee;
}

.view_more_menu_item {
  margin-bottom: 20rpx;
}
</style>
